import React, { Component } from 'react'
import Movie from './movie'
import Video from './video'
import ShortVideo from './shortVido'
import RouterView from '../router/routerView'
// 接口名字不要和路由名字冲突
import { Tabbar } from 'react-vant';
import { Route, Switch, NavLink, Link,Redirect } from 'react-router-dom'
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons';
 class All extends Component {
  render() {
    console.log(this.props);
    return (
      <div>
           {/* <Switch>
               <Route path="/all/movie" component={Movie}></Route>
               <Route path="/all/video" component={Video}></Route>
               <Route path="/all/shortvideo" component={ShortVideo}></Route>
               <Redirect from="/all" to="/all/movie"></Redirect>
               
           </Switch> */}
           <RouterView RouterList = {this.props.child}></RouterView>
           <Tabbar>
                <Tabbar.Item icon={<HomeO />}>
                    <NavLink to="/all/movie">电影</NavLink>
                </Tabbar.Item>
                <Tabbar.Item icon={<Search />}>
                     <NavLink to="/all/video">视频</NavLink>
                </Tabbar.Item>
                <Tabbar.Item icon={<FriendsO />}>
                    <NavLink to="/all/shortvideo">小视频</NavLink>
                </Tabbar.Item>
                <Tabbar.Item icon={<FriendsO />}>
                    <NavLink to="/my">我的</NavLink>
                </Tabbar.Item>
            </Tabbar>

      </div>
    )
  }
}

export default All